package com.systemmanger.service;

import com.bean.WmsTPermission;
import com.systemmanger.mapper.QuanXianGuanLiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class QuanXianGuanLiService {
    @Autowired
    QuanXianGuanLiMapper quanXianGuanLiMapper;

    public List<WmsTPermission> getPage(WmsTPermission wmsTPermission){
      return   quanXianGuanLiMapper.getPage(wmsTPermission);
    }


    @Transactional
    //删除权限，事务管理
    public void delete(String permID){
        quanXianGuanLiMapper.deleteGroup(permID);
        quanXianGuanLiMapper.deletePromission(permID);
    }
}
